<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>云钢</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css">
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <style>
        .aui-bar-light{ color: black; }
        .aui-bar-nav.aui-bar-light .aui-iconfont{ color: black; }
        .aui-tab-item.aui-active{ color: #4CD2E5; border-bottom: 2px solid #4CD2E5; }
    </style>
</head>

<body>
    <header class="aui-bar aui-bar-nav aui-bar-light" id="header">
        <a class="aui-pull-left aui-btn">
            
        </a>
        <div class="aui-title">热点资讯</div>
    </header>
    <div id="app" v-cloak>
        <div class="aui-tab" id="tab">
            <div :class="nav == 0 ? 'aui-tab-item aui-active' : 'aui-tab-item'" v-on:click="setNav(0)">行业资讯</div>
            <div :class="nav == 1 ? 'aui-tab-item aui-active' : 'aui-tab-item'" v-on:click="setNav(1)">商机资讯</div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript">

    var vm = {
        el: '#app',
        data: {
            nav: 0,
            list: []
        },
        mounted: function(){
            
        },
        methods: {
            setNav: function(index){
                this.nav = index;
                api.setFrameGroupIndex({
                    name: 'newsgroup',
                    scroll: true,
                    index: index
                });
            }
        }
    }
    apiready = function() {
        $api.fixStatusBar(
            $api.byId("header")
        );
        window.app = new Vue(vm);

        var footer_h = api.pageParam.footer_h;
        var app_h = $api.offset($api.byId('app')).h;
        var header_h = $api.offset($api.byId('header')).h;

        api.openFrameGroup({
            name: 'newsgroup',
            scrollEnabled:false,
            rect:{x:0, y:header_h + app_h, w:'auto', h:api.winHeight - header_h - app_h - footer_h - 25},
            index:0,
            background: '#fff',
            frames:[
                {
                    name: 'newslist1', 
                    url: 'news/newslist1_frm.html',
                    bgColor:'#fff',
                    bounces:true,
                    overScrollMode: 'always',
                    defaultRefreshHeader:'pull'
                },{
                    name: 'newslist2', 
                    url: 'news/newslist2_frm.html',
                    bgColor:'#fff',
                    bounces:true,
                    overScrollMode: 'always',
                    defaultRefreshHeader:'pull'
                }
            ]
        }, function(ret){
            
        })
    };

    function backpage(){
        api.closeWin({
            name: api.winName
        })
        
    }

</script>

</html>
